/**
 * 用户
 * WangPeixi
 */
var id = "";
var addForm = "";
$(function () {
    id = request.QueryString("id");//从跳转页面过来的
    addForm = $("#addForm");
    $("#btncancel").click(function () {
        addForm.form('reset');
        addForm.form("disableValidation");
    });
    addForm.form("disableValidation");

});

/**
 * 刷新grid
 */
function reloadGird() {
    gridReload("supplierList");
}


function addBankAccount() {
    if (addForm.form('enableValidation')) {
        addForm.form('submit', {
            url: '/addSupplier',
            success: function (msg) {
                msg = $.parseJSON(msg);
                if (msg.returnCode == '00') {
                    top.showMessage("添加成功!");
                    closeIframeWindow();
                    reloadGird();
                } else {
                    top.showMessage("<font color='red'>" + msg.returnMsg + "</font>!");
                }
            }
        });
    }
}
